class Student {
    //属性：成员变量 -》 定义在类的内部，方法的外部  成员变量属于对象的
    public string name;
    public int age;
    public double score;
    public string sex;
    //方法
    public void doClass(){
        System.out.println("上课！");
    }
    public void doHomework(){
        System.out.println("写作业！");
    }
//    public void doHomework(){
//        System.out.println(name+"在写作业！");
//    }

    public void show(){
        System.out.println("姓名： "+name+"年龄："+age+"分数: "+score+"性别： "+sex);
    }
}

public class test {
    public static void main(String[] args) {
        Student student = new Student();
        student.name = "mengqi";
        student.age = 20;
        student.score = 99.9;
        student.sex = "男";
        student.doClass();
        student.doHomework();
        student.show();

    }
}
